import request from "@/utils/request";

// 查询项目列表  KqAllInfos  kq  /work/kqAllInfo/  KqInfo  /work/kqAllInfo/
export function listKqAllInfos(query) {
  return request({
    url: "/work/kqAllInfo/",
    method: "get",
    params: query
  });
}

// 查询项目详细
export function getKqInfo(id) {
  return request({
    url: "/work/kqAllInfo/" + id + "/",
    method: "get"
  });
}

// 新增项目
export function addKqInfo(data) {
  return request({
    url: "/work/kqAllInfo/",
    method: "post",
    data: data
  });
}

// 修改项目
export function updateKqInfo(data) {
  return request({
    url: "/work/kqAllInfo/" + data.id + "/",
    method: "put",
    data: data
  });
}

// 修改项目
export function batchUpdateKqInfo(list) {
  return request({
    url: "/work/kqAllInfo/batchUpdateKqInfo/",
    method: "post",
    data: list
  });
}

export function updateKqInfoStatus(data) {
  return request({
    url: "/work/kqAllInfo/updateKqInfoStatus/",
    method: "put",
    data
  });
}
// 删除客户【没有删除数据】
export function batchDeleteKqInfo(data) {
  return request({
    url: "/work/kqAllInfo/batchDeleteKqInfo/",
    method: "post",
    data
  });
}

// 恢复客户数据
export function recoverKqInfo(id) {
  return request({
    url: "/work/kqAllInfo/recoverKqInfo/",
    method: "post",
    data: id
  });
}

// 导出项目
export function exportKqAllInfos(query) {
  return request({
    url: "/work/kqAllInfo/export/",
    method: "get",
    params: query
  });
}

// 下载项目导入模板
export function importTemplate() {
  return request({
    url: "/work/kqAllInfo/importTemplate/",
    method: "get"
  });
}

// 项目导入
export function importKqInfos(data) {
  return request({
    url: "/work/kqAllInfo/importTemplate/",
    method: "post",
    data: data
  });
}
